package fr.lille.inria.adam.lifl.EcoGardeInventory.Utils;

import java.io.ByteArrayOutputStream;

import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;

public class PhotoContent implements Content {
	private static final long serialVersionUID = -4421337038650652979L;
	protected byte[] jpegBytes;

	public PhotoContent(Bitmap bitmap) {
		ByteArrayOutputStream bos = new ByteArrayOutputStream();
		bitmap.compress(CompressFormat.JPEG, 95, bos);
		this.jpegBytes=bos.toByteArray();
	}
	
	public byte[] getJpegBytes() {
		return this.jpegBytes;
	}
}
